
import React, { useState, useEffect, useRef } from 'react';
import { connect } from 'dva';
import _ from 'lodash';
import { CloseOutlined } from '@ant-design/icons';
import Slice3D from '@/components/widgets/Slice';
import styles from './index.less';
import { ConnectProps, ConnectState } from '@/models/connect';
import { MaptoolbarModelState } from '@/models/maptoolbar';

interface MapToolbarPropTypes extends ConnectProps {
    maptoolbar: MaptoolbarModelState;
    style?: React.StyleHTMLAttributes<HTMLDivElement>;
    onClose: Function;
  }
  const Pouqie3Dbutton: React.FC<MapToolbarPropTypes> = props => {
    const { maptoolbar, style, onClose } = props;

  return (
    <div
      className={styles.panelWrap}
    >
      <div className={styles.panelHead}>
        <span>剖切</span>
        <span onClick={(): void => onClose && onClose()}>
          <CloseOutlined />
        </span>
      </div>
      <div className={styles.panelContent}>
        <Slice3D/>
      </div>
    </div>
  );
};


export default connect(({ maptoolbar }: ConnectState) => {
    return {
        maptoolbar,
    };
})(Pouqie3Dbutton);
